﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;

namespace Baosight.Ccs.Mail.Handlers
{
    /// <summary>
    /// 处理未处理的邮件
    /// 当在所有之前的IMailHandler都没有处理邮件时，将邮件状态置位Error
    /// </summary>
    public class UnhandledHandler : IMailHandler
    {

        #region IMailHandler Members

        public bool Process(Mail mail)
        {
            MailManager.Instance.ChangeMailStatus(mail, MailStatus.Error);
            return true;

        }

        #endregion
    }
}
